import {createRouter,createWebHistory} from 'vue-router'
import type {RouteRecordRaw} from 'vue-router'
import Layout from '@/layout/index.vue'
const routes: RouteRecordRaw[] = [
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [
      {
        path: 'dashboard',
        name: 'Dashboard',
        component: ()=>import('@/views/dashboard/DashBoard.vue')
      }
    ]
  },
  {
    path: '/home',
    component: ()=>import('@/views/Home.vue')
  },
  {
    path: '/about',
    component: ()=>import('@/views/About.vue')
  }
]
export default createRouter({
  history: createWebHistory(),
  routes
})